package org.mock.sample.calc;

/**
 * class that has a dependency - multiplicatorService - and calls the method 'customMultiply' on it.
 * 
 * @author lbradisteanu
 *
 */
public class CalculationManager {

    private IMultiplicationService multiplicatorService;

    public IMultiplicationService getMultiplicatorService() {
        return multiplicatorService;
    }

    public void setMultiplicatorService(IMultiplicationService multiplicatorService) {
        this.multiplicatorService = multiplicatorService;
    }

    public Integer calculatePrice(Integer price, Integer amount, Integer reduction) {
        return multiplicatorService.customMultiply(price, amount) - reduction;
    }
}
